package cn.accp.mvc.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.accp.mvc.dao.HouseDao;
import cn.accp.mvc.entity.House;
import cn.accp.mvc.entity.allEntity;
import cn.accp.mvc.service.HouseService;
@Service("houseService")
public class HouseServiceImpl implements HouseService {
	@Autowired
	private HouseDao houseDao;
	public void setHouseDao(HouseDao houseDao) {
		this.houseDao = houseDao;
	}
	@Override
	public boolean save(House house) {
		return houseDao.save(house);
	}

	@Override
	public List<allEntity> findHouseByPage(int pageIndex, int pageSize) {
		return houseDao.findHouseByPage(pageIndex, pageSize);
	}

	@Override
	public int houseCount(int pageSize) {
		return houseDao.houseCount(pageSize);
	}

	@Override
	public boolean delete(int id) {
		return houseDao.delete(id);
	}

	@Override
	public allEntity getHouse(int id) {
		return houseDao.getHouse(id);
	}

	@Override
	public boolean update(House house) {
		return houseDao.update(house);
	}

}
